//
//  GBNSUtils.h
//  PngOK
//
//  Created by wanglidong on 14-4-30.
//  Copyright (c) 2014年 GoldenBull. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>

@interface GBNSUtils : NSObject

+ (void)addTarget:(id)target action:(SEL)action forControl:(id)control;

/**
 * 执行一段bash
 */
+ (NSString *)runCommand:(NSString *)command2Run;

/**
 * 打开finder, 选目录
 * @param canCreateDirectories      是否可以新建folder
 * @param handler      回调
 */
+ (void)openFolder:(BOOL)canCreateDirectories completionHandler:(void (^)(NSInteger result, NSString *path))handler;
/**
 * 打开finder, 选文件或目录
 * @param filters      过滤条件
 * @param handler      回调
 */
+ (void)openItem:(NSArray *)filters completionHandler:(void (^)(NSInteger result, NSArray *urls))handler;

@end
